package com.tentative.competition.common.model.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

@ApiModel(description = "获取会员plus商品列表参数")
@Data
public class ClientPlusGoodsQueryParam extends PageParam {

    @ApiModelProperty("plusPriceOfferSelect=可设置的plus会员商品，plusPriceOfferQuery=已设置的plus会员商品")
    @NotNull(message = "查询类型不可为空")
    public String type;


    public String getListKey;

    public String getGetListKey() {
        switch (this.type){
            case "plusPriceOfferSelect":
                return "offerInfoList";
            case "plusPriceOfferQuery":
                return "activityOffers";
            default:
                return "activityOffers";
        }
    }
}
